<template>
  <div class="upcoming-box">
    <umcomingNavbar :title="title"></umcomingNavbar>
    <div class="upcoming-allChunk" v-if="$route.params.title == 'upcoming'">
      <contentChunk />
    </div>
    <div class="upcoming-titleChunk" v-else>
      <TitleChunk></TitleChunk>
      <TitleChunk></TitleChunk>
    </div>
  </div>
</template>

<script>
import umcomingNavbar from './upcomingChunk/upcomingNavbar'
import contentChunk from './upcomingChunk/contentChunk'
import TitleChunk from './upcomingChunk/titleChunk' 
import { ref } from 'vue'
import { useRoute } from 'vue-router'
export default {
  name: 'FissionFriendsH5Index',
  components: {
    umcomingNavbar,
    contentChunk, 
    TitleChunk
  },
  setup() {
    const route = useRoute()
    const title = ref()
    // 判断route中传的值给narbar赋值
    route.params.title == 'new' ? (title.value = '新片速递') : (title.value = '即将上线')
    return {
      title
    }
  }
}
</script>

<style lang="scss" scoped></style>
